
function save()
{

	var eName = document.getElementById("name");
	var eSubmit = document.getElementById("submit");
	
	var sName = eName.value;
	
	eName.disabled = true;
	eSubmit.disabled = true;

	$("#edit-msg").removeClass().html(g_sLoadingImage + "保存中...");

	$.ajax({
		type: "POST",
		url: "./?action=user.control_panel.ajax_edit_save",
		data: "name="+sName,
		dataType: "json",
		success: function(json){

			eName.disabled = false;
			eSubmit.disabled = false;
			
			if(json.status=="0")
			{
				$("#edit-msg").removeClass().html("");
				$("#edit-form").html( "<p>"+json.description+"</p>" );	
			}
			else
				$("#edit-msg").attr("class", "message-error").html(json.description);
		}
	});

	return false;
}